package com.pft.web.view.dialog;

import android.app.Activity;
import android.app.Dialog;

import com.pft.web.R;


public abstract class BaseDialog extends Dialog {

    public BaseDialog(Activity activity) {
        this(activity, R.style.AppDialog);
    }

    public BaseDialog(Activity activity, int themeResId) {
        super(activity, themeResId);
        initView();
    }

    protected abstract void initView();

    public void show(Activity activity) {
        if (activity != null && !activity.isFinishing()) {
            super.show();
        }
    }

    public void dismiss(Activity activity) {
        if (activity != null && !activity.isFinishing()) {
            super.dismiss();
        }
    }

}
